package biz.datalk.industrialland.admin.modules.online.dynform.pojo.po;

import biz.datalk.industrialland.common.pojo.po.BasePO;
import biz.datalk.industrialland.common.validated.Delete;
import biz.datalk.industrialland.common.validated.Detail;
import biz.datalk.industrialland.common.validated.Insert;
import biz.datalk.industrialland.common.validated.Update;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * Mapping Table: dynform_button
 * 
 * @author tarofang
 */
@Getter
@Accessors(chain=true)
@EqualsAndHashCode(onlyExplicitlyIncluded=true, callSuper=false)
@Setter
public class DynformButton extends BasePO implements Serializable {
    /**
     * 主键ID
     *
     * dynform_button.id
     */
    @EqualsAndHashCode.Include
    @NotBlank(groups = {Delete.class, Update.class, Detail.class}, message = "{validations.online.dynform.button.no.exists.or.delete}")
    private String id;

    /**
     * 按钮编码(js增强的方法名)
     *
     * dynform_button.btn_code
     */
    @NotBlank(groups = {Insert.class, Update.class}, message = "{validations.online.dynform.button.invalid.blank.btnCode}")
    private String btnCode;

    /**
     * 按钮图标
     *
     * dynform_button.btn_icon
     */
    private String btnIcon;

    /**
     * 按钮名称
     *
     * dynform_button.btn_name
     */
    @NotBlank(groups = {Insert.class, Update.class}, message = "{validations.online.dynform.button.invalid.blank.btnName}")
    private String btnName;

    /**
     * 按钮样式 link button form
     *
     * dynform_button.btn_style
     */
    @NotBlank(groups = {Insert.class, Update.class}, message = "{validations.online.dynform.button.invalid.blank.btnStyle}")
    private String btnStyle;

    /**
     * 表达式
     *
     * dynform_button.exp
     */
    private String exp;

    /**
     * 表单ID
     *
     * dynform_button.table_id
     */
    @NotBlank(groups = {Insert.class, Update.class}, message = "{validations.online.dynform.button.invalid.blank.tableId}")
    private String tableId;

    /**
     * 按钮类型 js/action
     *
     * dynform_button.opt_type
     */
    @NotBlank(groups = {Insert.class, Update.class}, message = "{validations.online.dynform.button.invalid.blank.optType}")
    private String optType;

    /**
     * 排序
     *
     * dynform_button.btn_order
     */
    @NotNull(groups = {Insert.class, Update.class}, message = "{validations.online.dynform.button.invalid.blank.btnOrder}")
    private Integer btnOrder;

    /**
     * 创建人ID
     *
     * dynform_button.create_by
     */
    private String createBy;

    /**
     * 创建人名称
     *
     * dynform_button.create_name
     */
    private String createName;

    /**
     * 创建时间
     *
     * dynform_button.create_time
     */
    private Date createTime;

    /**
     * 更新人ID
     *
     * dynform_button.update_by
     */
    private String updateBy;

    /**
     * 更新人名称
     *
     * dynform_button.update_name
     */
    private String updateName;

    /**
     * 更新时间
     *
     * dynform_button.update_time
     */
    private Date updateTime;

    /**
     * 所属部门
     *
     * dynform_button.sys_org_code
     */
    private String sysOrgCode;

    /**
     * 是否有效 Y-有效 N-无效
     *
     * dynform_button.is_valid
     */
    @NotNull(groups = {Insert.class, Update.class}, message = "{validations.online.dynform.button.invalid.blank.isValid}")
    private String isValid;

    /**
     * 是否删除 Y-已删除 N-未删除
     *
     * dynform_button.is_delete
     */
    private String isDelete;

    /**
     * 页面地址
     *
     * dynform_button.page_url
     */
    private String pageUrl;

    private static final long serialVersionUID = 1L;
}